<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>API Reference</title>

    <link rel="stylesheet" href="css/style.css" />
    <script src="js/all.js"></script>


          <script>
        $(function() {
            setupLanguages(["bash","javascript"]);
        });
      </script>
      </head>

  <body class="">
    <a href="#" id="nav-button">
      <span>
        NAV
        <img src="images/navbar.png" />
      </span>
    </a>
    <div class="tocify-wrapper">
        <img src="images/logo.png" />
                    <div class="lang-selector">
                                  <a href="#" data-language-name="bash">bash</a>
                                  <a href="#" data-language-name="javascript">javascript</a>
                            </div>
                            <div class="search">
              <input type="text" class="search" id="input-search" placeholder="Search">
            </div>
            <ul class="search-results"></ul>
              <div id="toc">
      </div>
                    <ul class="toc-footer">
                                  <li><a href='http://github.com/mpociot/documentarian'>Documentation Powered by Documentarian</a></li>
                            </ul>
            </div>
    <div class="page-wrapper">
      <div class="dark-box"></div>
      <div class="content">
          <!-- START_INFO -->
<h1>Info</h1>
<p>Welcome to the generated API reference.
<a href="http://localhost/docs/collection.json">Get Postman Collection</a></p>
<!-- END_INFO -->
<h1>general</h1>
<!-- START_9885b9f3c973a45a70f650c71558fb17 -->
<h2>微信小程序登录</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X POST "http://localhost/api/v1/login/wechatMiniProgram" \
-H "Accept: application/json" \
    -d "code"="qui" \
</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/login/wechatMiniProgram",
    "method": "POST",
    "data": {
        "code": "qui"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<blockquote>
<p>Example response:</p>
</blockquote>
<pre><code class="language-json">{
    "data": {
        "token": "jxqqagg4ykN20k8ZCUFueXfkimlIiyFyuqPP2AQFQFOkXc4m5LOxXWhgTvSF"
    }
}</code></pre>
<h3>HTTP Request</h3>
<p><code>POST api/v1/login/wechatMiniProgram</code></p>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Status</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>string</td>
<td>required</td>
</tr>
</tbody>
</table>
<!-- END_9885b9f3c973a45a70f650c71558fb17 -->
<!-- START_3ed479cce530d65237e8cbd29d09d39c -->
<h2>搜索国旗</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X GET "http://localhost/api/v1/search/flag" \
-H "Accept: application/json" \
    -d "query"="deserunt" \
</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/search/flag",
    "method": "GET",
    "data": {
        "query": "deserunt"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<blockquote>
<p>Example response:</p>
</blockquote>
<pre><code class="language-json">{
    "message": "The given data was invalid.",
    "errors": {
        "query": [
            "The query field is required."
        ]
    }
}</code></pre>
<h3>HTTP Request</h3>
<p><code>GET api/v1/search/flag</code></p>
<p><code>HEAD api/v1/search/flag</code></p>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Status</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>query</td>
<td>string</td>
<td>required</td>
</tr>
</tbody>
</table>
<!-- END_3ed479cce530d65237e8cbd29d09d39c -->
<h1>俱乐部</h1>
<p>Class GroupController</p>
<!-- START_85b16fb50f472229c79718aeb84d2586 -->
<h2>我的俱乐部</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X GET "http://localhost/api/v1/group" \
-H "Accept: application/json"</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/group",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<blockquote>
<p>Example response:</p>
</blockquote>
<pre><code class="language-json">{
    "data": [
        {
            "id": 5,
            "name": "第一个俱乐部",
            "user_count": 1,
            "logo": "http:\/\/localhost\/storage\/logos\/U8DrqP5KznFCnU0HZ8ck1D26.png",
            "links": {
                "self": "http:\/\/localhost\/api\/v1\/group\/5"
            }
        },
        {
            "id": 4,
            "name": "第一个俱乐部",
            "user_count": 1,
            "logo": "http:\/\/localhost\/storage\/logos\/kDF62YCSLY33B6dMlQEyZM6i.png",
            "links": {
                "self": "http:\/\/localhost\/api\/v1\/group\/4"
            }
        },
        {
            "id": 3,
            "name": "第一个俱乐部",
            "user_count": 1,
            "logo": "http:\/\/localhost\/storage\/logos\/9zfuoqvnWyiqts9l.png",
            "links": {
                "self": "http:\/\/localhost\/api\/v1\/group\/3"
            }
        },
        {
            "id": 2,
            "name": "第一个俱乐部",
            "user_count": 1,
            "logo": "http:\/\/localhost\/storage\/logos\/yThsfCQIg0gdTm6E.png",
            "links": {
                "self": "http:\/\/localhost\/api\/v1\/group\/2"
            }
        },
        {
            "id": 1,
            "name": "第一个俱乐部",
            "user_count": 1,
            "logo": "http:\/\/localhost\/storage\/logos\/uFf9obs4X2mygmLl7jwryryS.png",
            "links": {
                "self": "http:\/\/localhost\/api\/v1\/group\/1"
            }
        }
    ],
    "links": {
        "first": "http:\/\/localhost\/api\/v1\/group?page=1",
        "last": "http:\/\/localhost\/api\/v1\/group?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "http:\/\/localhost\/api\/v1\/group",
        "per_page": 15,
        "to": 5,
        "total": 5
    }
}</code></pre>
<h3>HTTP Request</h3>
<p><code>GET api/v1/group</code></p>
<p><code>HEAD api/v1/group</code></p>
<!-- END_85b16fb50f472229c79718aeb84d2586 -->
<!-- START_2031af306a6ccd69e4d7545a1821bc5e -->
<h2>创建俱乐部</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X POST "http://localhost/api/v1/group" \
-H "Accept: application/json" \
    -d "name"="est" \
    -d "logo"="est" \
    -d "join_type"="2" \
    -d "join_password"="est" \
    -d "copper"="77156148" \
    -d "description"="est" \
    -d "create_quiz_type"="1" \
</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/group",
    "method": "POST",
    "data": {
        "name": "est",
        "logo": "est",
        "join_type": "2",
        "join_password": "est",
        "copper": 77156148,
        "description": "est",
        "create_quiz_type": "1"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<h3>HTTP Request</h3>
<p><code>POST api/v1/group</code></p>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Status</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>string</td>
<td>required</td>
<td>Maximum: <code>50</code></td>
</tr>
<tr>
<td>logo</td>
<td>string</td>
<td>optional</td>
<td>Maximum: <code>1024</code> Allowed mime types: <code>jpeg</code>, <code>bmp</code> or <code>png</code></td>
</tr>
<tr>
<td>join_type</td>
<td>string</td>
<td>required</td>
<td><code>0</code>, <code>1</code> or <code>2</code></td>
</tr>
<tr>
<td>join_password</td>
<td>string</td>
<td>optional</td>
<td>Maximum: <code>50</code></td>
</tr>
<tr>
<td>copper</td>
<td>integer</td>
<td>required</td>
<td>Maximum: <code>100000000</code></td>
</tr>
<tr>
<td>description</td>
<td>string</td>
<td>optional</td>
<td>Maximum: <code>20000</code></td>
</tr>
<tr>
<td>create_quiz_type</td>
<td>string</td>
<td>required</td>
<td><code>0</code> or <code>1</code></td>
</tr>
</tbody>
</table>
<!-- END_2031af306a6ccd69e4d7545a1821bc5e -->
<!-- START_6e7c087a1a72dc04fca38e97a698754f -->
<h2>俱乐部详情</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X GET "http://localhost/api/v1/group/{group}" \
-H "Accept: application/json"</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/group/{group}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<blockquote>
<p>Example response:</p>
</blockquote>
<pre><code class="language-json">{
    "data": {
        "id": 1,
        "name": "第一个俱乐部",
        "user_count": 1,
        "logo": "http:\/\/localhost\/storage\/logos\/uFf9obs4X2mygmLl7jwryryS.png",
        "links": {
            "self": "http:\/\/localhost\/api\/v1\/group\/1",
            "users": "http:\/\/localhost\/api\/v1\/group\/1\/users"
        },
        "creater": {
            "id": 1,
            "name": "hi",
            "avatar": "http:\/\/scimg.jb51.net\/allimg\/150709\/14-150F91201425M.jpg"
        },
        "join_type_name": "public",
        "join_type": 1,
        "join_password": "123456",
        "copper": 100000,
        "description": null,
        "created_at": "2018-06-13 10:00:07",
        "is_owner": true,
        "has_joined": true
    }
}</code></pre>
<h3>HTTP Request</h3>
<p><code>GET api/v1/group/{group}</code></p>
<p><code>HEAD api/v1/group/{group}</code></p>
<!-- END_6e7c087a1a72dc04fca38e97a698754f -->
<!-- START_2c8f9c11adf4fa2b4436789ffe7f930d -->
<h2>修改俱乐部</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X POST "http://localhost/api/v1/group/{group}" \
-H "Accept: application/json" \
    -d "name"="fugit" \
    -d "logo"="fugit" \
    -d "join_type"="0" \
    -d "join_password"="fugit" \
    -d "copper"="11408993" \
    -d "description"="fugit" \
    -d "create_quiz_type"="0" \
</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/group/{group}",
    "method": "POST",
    "data": {
        "name": "fugit",
        "logo": "fugit",
        "join_type": "0",
        "join_password": "fugit",
        "copper": 11408993,
        "description": "fugit",
        "create_quiz_type": "0"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<h3>HTTP Request</h3>
<p><code>POST api/v1/group/{group}</code></p>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Status</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>string</td>
<td>required</td>
<td>Maximum: <code>50</code></td>
</tr>
<tr>
<td>logo</td>
<td>string</td>
<td>optional</td>
<td>Maximum: <code>1024</code> Allowed mime types: <code>jpeg</code>, <code>bmp</code> or <code>png</code></td>
</tr>
<tr>
<td>join_type</td>
<td>string</td>
<td>required</td>
<td><code>0</code>, <code>1</code> or <code>2</code></td>
</tr>
<tr>
<td>join_password</td>
<td>string</td>
<td>optional</td>
<td>Maximum: <code>50</code></td>
</tr>
<tr>
<td>copper</td>
<td>integer</td>
<td>required</td>
<td>Maximum: <code>100000000</code></td>
</tr>
<tr>
<td>description</td>
<td>string</td>
<td>optional</td>
<td>Maximum: <code>20000</code></td>
</tr>
<tr>
<td>create_quiz_type</td>
<td>string</td>
<td>required</td>
<td><code>0</code> or <code>1</code></td>
</tr>
</tbody>
</table>
<!-- END_2c8f9c11adf4fa2b4436789ffe7f930d -->
<!-- START_ccc793003ed2325126e2a0970716c367 -->
<h2>俱乐部成员</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X GET "http://localhost/api/v1/group/{group}/users" \
-H "Accept: application/json"</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/group/{group}/users",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<blockquote>
<p>Example response:</p>
</blockquote>
<pre><code class="language-json">{
    "data": {
        "users": [
            {
                "id": 1,
                "name": "hi",
                "avatar": "http:\/\/scimg.jb51.net\/allimg\/150709\/14-150F91201425M.jpg",
                "copper": 10640,
                "can_remove": false
            },
            {
                "id": 2,
                "name": null,
                "avatar": null,
                "copper": 9760,
                "can_remove": true
            }
        ],
        "is_owner": true
    }
}</code></pre>
<h3>HTTP Request</h3>
<p><code>GET api/v1/group/{group}/users</code></p>
<p><code>HEAD api/v1/group/{group}/users</code></p>
<!-- END_ccc793003ed2325126e2a0970716c367 -->
<h1>用户</h1>
<p>Class UserController</p>
<!-- START_a88ec11814e4e13792607ebedf33f5fc -->
<h2>修改用户信息</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X POST "http://localhost/api/v1/user/update" \
-H "Accept: application/json" \
    -d "name"="vitae" \
    -d "avatar"="vitae" \
</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/user/update",
    "method": "POST",
    "data": {
        "name": "vitae",
        "avatar": "vitae"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<h3>HTTP Request</h3>
<p><code>POST api/v1/user/update</code></p>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Status</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>string</td>
<td>required</td>
<td>Maximum: <code>100</code></td>
</tr>
<tr>
<td>avatar</td>
<td>string</td>
<td>required</td>
<td>Maximum: <code>500</code></td>
</tr>
</tbody>
</table>
<!-- END_a88ec11814e4e13792607ebedf33f5fc -->
<!-- START_b2892eb191cd19c0a6f1aae56ba43db4 -->
<h2>用户信息</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X GET "http://localhost/api/v1/user" \
-H "Accept: application/json"</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/user",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<blockquote>
<p>Example response:</p>
</blockquote>
<pre><code class="language-json">{
    "data": {
        "id": 1,
        "name": "hi",
        "avatar": "http:\/\/scimg.jb51.net\/allimg\/150709\/14-150F91201425M.jpg"
    }
}</code></pre>
<h3>HTTP Request</h3>
<p><code>GET api/v1/user</code></p>
<p><code>HEAD api/v1/user</code></p>
<!-- END_b2892eb191cd19c0a6f1aae56ba43db4 -->
<h1>竞猜</h1>
<p>Class QuizController</p>
<!-- START_bc79889b0f913de97cef6e1183469e8a -->
<h2>我的竞猜列表</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X GET "http://localhost/api/v1/quiz" \
-H "Accept: application/json"</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/quiz",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<blockquote>
<p>Example response:</p>
</blockquote>
<pre><code class="language-json">{
    "data": [
        {
            "id": 3,
            "name": "第一个竞猜",
            "options": {
                "home_team": "德国队",
                "visiting_team": "英国队",
                "start_at": "2018-06-20 13:00:00"
            },
            "status": 2,
            "creater": {
                "id": 1,
                "name": "hi",
                "avatar": "http:\/\/scimg.jb51.net\/allimg\/150709\/14-150F91201425M.jpg"
            },
            "group": {
                "id": 1,
                "name": "第一个俱乐部",
                "user_count": 1,
                "logo": "http:\/\/localhost\/storage\/logos\/uFf9obs4X2mygmLl7jwryryS.png",
                "links": {
                    "self": "http:\/\/localhost\/api\/v1\/group\/1"
                }
            }
        },
        {
            "id": 2,
            "name": "第一个竞猜",
            "options": {
                "home_team": "德国队",
                "visiting_team": "英国队",
                "start_at": "2018-06-20 13:00:00"
            },
            "status": 2,
            "creater": {
                "id": 1,
                "name": "hi",
                "avatar": "http:\/\/scimg.jb51.net\/allimg\/150709\/14-150F91201425M.jpg"
            },
            "group": {
                "id": 1,
                "name": "第一个俱乐部",
                "user_count": 1,
                "logo": "http:\/\/localhost\/storage\/logos\/uFf9obs4X2mygmLl7jwryryS.png",
                "links": {
                    "self": "http:\/\/localhost\/api\/v1\/group\/1"
                }
            }
        },
        {
            "id": 1,
            "name": "第一个竞猜",
            "options": {
                "home_team": "德国队",
                "visiting_team": "英国队",
                "start_at": "2018-06-20 13:00:00"
            },
            "status": 3,
            "creater": {
                "id": 2,
                "name": null,
                "avatar": null
            },
            "group": {
                "id": 1,
                "name": "第一个俱乐部",
                "user_count": 1,
                "logo": "http:\/\/localhost\/storage\/logos\/uFf9obs4X2mygmLl7jwryryS.png",
                "links": {
                    "self": "http:\/\/localhost\/api\/v1\/group\/1"
                }
            }
        }
    ],
    "links": {
        "first": "http:\/\/localhost\/api\/v1\/quiz?page=1",
        "last": "http:\/\/localhost\/api\/v1\/quiz?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "http:\/\/localhost\/api\/v1\/quiz",
        "per_page": 15,
        "to": 3,
        "total": 3
    }
}</code></pre>
<h3>HTTP Request</h3>
<p><code>GET api/v1/quiz</code></p>
<p><code>HEAD api/v1/quiz</code></p>
<!-- END_bc79889b0f913de97cef6e1183469e8a -->
<!-- START_5fe89877690543e117acf6fb374a3504 -->
<h2>竞猜详情</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X GET "http://localhost/api/v1/quiz/{quiz}" \
-H "Accept: application/json"</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/quiz/{quiz}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<blockquote>
<p>Example response:</p>
</blockquote>
<pre><code class="language-json">{
    "data": {
        "id": 1,
        "name": "第一个竞猜",
        "options": {
            "home_team": "德国队",
            "visiting_team": "英国队",
            "start_at": "2018-06-20 13:00:00"
        },
        "status": 3,
        "creater": {
            "id": 2,
            "name": null,
            "avatar": null
        },
        "group": {
            "id": 1,
            "name": "第一个俱乐部",
            "user_count": 1,
            "logo": "http:\/\/localhost\/storage\/logos\/uFf9obs4X2mygmLl7jwryryS.png",
            "links": {
                "self": "http:\/\/localhost\/api\/v1\/group\/1"
            }
        },
        "type": 2,
        "is_creater": false,
        "result": "1:2",
        "items": [
            {
                "id": 1,
                "name": "德国胜",
                "odds": 1.6,
                "status": 1,
                "result": "win",
                "coppers_total": 400,
                "players_total": 1,
                "current_bets": [
                    {
                        "quiz_item_id": 1,
                        "copper": 100,
                        "odds": 1.6,
                        "status": 3,
                        "created_at": "2018-06-19 03:34:54"
                    },
                    {
                        "quiz_item_id": 1,
                        "copper": 100,
                        "odds": 1.6,
                        "status": 3,
                        "created_at": "2018-06-19 03:34:53"
                    },
                    {
                        "quiz_item_id": 1,
                        "copper": 100,
                        "odds": 1.6,
                        "status": 3,
                        "created_at": "2018-06-19 03:32:46"
                    },
                    {
                        "quiz_item_id": 1,
                        "copper": 100,
                        "odds": 1.6,
                        "status": 3,
                        "created_at": "2018-06-19 03:28:35"
                    },
                    {
                        "quiz_item_id": 1,
                        "copper": 100,
                        "odds": 1.6,
                        "status": 1,
                        "created_at": "2018-06-19 02:54:15"
                    },
                    {
                        "quiz_item_id": 1,
                        "copper": 100,
                        "odds": 1.6,
                        "status": 1,
                        "created_at": "2018-06-19 02:53:04"
                    },
                    {
                        "quiz_item_id": 1,
                        "copper": 100,
                        "odds": 1.6,
                        "status": 1,
                        "created_at": "2018-06-19 02:51:54"
                    },
                    {
                        "quiz_item_id": 1,
                        "copper": 100,
                        "odds": 1.6,
                        "status": 1,
                        "created_at": "2018-06-19 02:51:18"
                    },
                    {
                        "quiz_item_id": 1,
                        "copper": 100,
                        "odds": 1.6,
                        "status": 1,
                        "created_at": "2018-06-19 02:51:17"
                    },
                    {
                        "quiz_item_id": 1,
                        "copper": 100,
                        "odds": 1.6,
                        "status": 1,
                        "created_at": "2018-06-19 02:48:11"
                    }
                ]
            },
            {
                "id": 2,
                "name": "英国胜",
                "odds": 2.3,
                "status": 1,
                "result": "lose",
                "coppers_total": 0,
                "players_total": 0,
                "current_bets": []
            }
        ],
        "players": {
            "data": [
                {
                    "id": 1,
                    "name": "hi",
                    "avatar": "http:\/\/scimg.jb51.net\/allimg\/150709\/14-150F91201425M.jpg"
                }
            ],
            "total": 1
        }
    }
}</code></pre>
<h3>HTTP Request</h3>
<p><code>GET api/v1/quiz/{quiz}</code></p>
<p><code>HEAD api/v1/quiz/{quiz}</code></p>
<!-- END_5fe89877690543e117acf6fb374a3504 -->
<!-- START_42a1d6a4c5117b43605082dfe3e21b5a -->
<h2>竞猜参与人列表</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X GET "http://localhost/api/v1/quiz/{quiz}/player" \
-H "Accept: application/json"</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/quiz/{quiz}/player",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<blockquote>
<p>Example response:</p>
</blockquote>
<pre><code class="language-json">{
    "data": [
        {
            "id": 1,
            "name": "hi",
            "avatar": "http:\/\/scimg.jb51.net\/allimg\/150709\/14-150F91201425M.jpg"
        }
    ],
    "links": {
        "first": "http:\/\/localhost\/api\/v1\/quiz\/1\/player?page=1",
        "last": "http:\/\/localhost\/api\/v1\/quiz\/1\/player?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "http:\/\/localhost\/api\/v1\/quiz\/1\/player",
        "per_page": 15,
        "to": 1,
        "total": 1
    }
}</code></pre>
<h3>HTTP Request</h3>
<p><code>GET api/v1/quiz/{quiz}/player</code></p>
<p><code>HEAD api/v1/quiz/{quiz}/player</code></p>
<!-- END_42a1d6a4c5117b43605082dfe3e21b5a -->
<!-- START_34f3904b3fe476226f39e6d768656a58 -->
<h2>俱乐部竞猜列表</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X GET "http://localhost/api/v1/quiz/{group}/group" \
-H "Accept: application/json"</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/quiz/{group}/group",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<blockquote>
<p>Example response:</p>
</blockquote>
<pre><code class="language-json">{
    "data": [
        {
            "id": 1,
            "name": "第一个竞猜",
            "options": {
                "home_team": "德国队",
                "visiting_team": "英国队",
                "start_at": "2018-06-20 13:00:00"
            },
            "status": 3,
            "creater": {
                "id": 2,
                "name": null,
                "avatar": null
            },
            "group": {
                "id": 1,
                "name": "第一个俱乐部",
                "user_count": 1,
                "logo": "http:\/\/localhost\/storage\/logos\/uFf9obs4X2mygmLl7jwryryS.png",
                "links": {
                    "self": "http:\/\/localhost\/api\/v1\/group\/1"
                }
            }
        },
        {
            "id": 2,
            "name": "第一个竞猜",
            "options": {
                "home_team": "德国队",
                "visiting_team": "英国队",
                "start_at": "2018-06-20 13:00:00"
            },
            "status": 2,
            "creater": {
                "id": 1,
                "name": "hi",
                "avatar": "http:\/\/scimg.jb51.net\/allimg\/150709\/14-150F91201425M.jpg"
            },
            "group": {
                "id": 1,
                "name": "第一个俱乐部",
                "user_count": 1,
                "logo": "http:\/\/localhost\/storage\/logos\/uFf9obs4X2mygmLl7jwryryS.png",
                "links": {
                    "self": "http:\/\/localhost\/api\/v1\/group\/1"
                }
            }
        },
        {
            "id": 3,
            "name": "第一个竞猜",
            "options": {
                "home_team": "德国队",
                "visiting_team": "英国队",
                "start_at": "2018-06-20 13:00:00"
            },
            "status": 2,
            "creater": {
                "id": 1,
                "name": "hi",
                "avatar": "http:\/\/scimg.jb51.net\/allimg\/150709\/14-150F91201425M.jpg"
            },
            "group": {
                "id": 1,
                "name": "第一个俱乐部",
                "user_count": 1,
                "logo": "http:\/\/localhost\/storage\/logos\/uFf9obs4X2mygmLl7jwryryS.png",
                "links": {
                    "self": "http:\/\/localhost\/api\/v1\/group\/1"
                }
            }
        }
    ],
    "links": {
        "first": "http:\/\/localhost\/api\/v1\/quiz\/1\/group?page=1",
        "last": "http:\/\/localhost\/api\/v1\/quiz\/1\/group?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "http:\/\/localhost\/api\/v1\/quiz\/1\/group",
        "per_page": 15,
        "to": 3,
        "total": 3
    }
}</code></pre>
<h3>HTTP Request</h3>
<p><code>GET api/v1/quiz/{group}/group</code></p>
<p><code>HEAD api/v1/quiz/{group}/group</code></p>
<!-- END_34f3904b3fe476226f39e6d768656a58 -->
<!-- START_b75b40cb3a8d837dfdd7f5b7dfadc54d -->
<h2>创建竞猜</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X POST "http://localhost/api/v1/quiz" \
-H "Accept: application/json" \
    -d "name"="vitae" \
    -d "type"="1" \
    -d "options.home_team"="vitae" \
    -d "options.visiting_team"="vitae" \
    -d "options.start_at"="2018-06-19 10:34:38" \
    -d "group_id"="3" \
    -d "copper_limit"="8201399" \
    -d "is_public"="1" \
    -d "stop_at"="2018-06-19 10:34:38" \
    -d "items"="vitae" \
</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/quiz",
    "method": "POST",
    "data": {
        "name": "vitae",
        "type": "1",
        "options.home_team": "vitae",
        "options.visiting_team": "vitae",
        "options.start_at": "2018-06-19 10:34:38",
        "group_id": 3,
        "copper_limit": 8201399,
        "is_public": true,
        "stop_at": "2018-06-19 10:34:38",
        "items": "vitae"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<h3>HTTP Request</h3>
<p><code>POST api/v1/quiz</code></p>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Status</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>string</td>
<td>required</td>
<td>Maximum: <code>100</code></td>
</tr>
<tr>
<td>type</td>
<td>string</td>
<td>required</td>
<td><code>1</code> or <code>2</code></td>
</tr>
<tr>
<td>options.home_team</td>
<td>string</td>
<td>optional</td>
<td>Maximum: <code>50</code></td>
</tr>
<tr>
<td>options.visiting_team</td>
<td>string</td>
<td>optional</td>
<td>Maximum: <code>50</code></td>
</tr>
<tr>
<td>options.start_at</td>
<td>date</td>
<td>optional</td>
<td>Date format: <code>Y-m-d H:i:s</code></td>
</tr>
<tr>
<td>group_id</td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td>copper_limit</td>
<td>integer</td>
<td>required</td>
<td>Maximum: <code>100000000</code></td>
</tr>
<tr>
<td>is_public</td>
<td>boolean</td>
<td>required</td>
</tr>
<tr>
<td>stop_at</td>
<td>date</td>
<td>required</td>
<td>Date format: <code>Y-m-d H:i:s</code></td>
</tr>
<tr>
<td>items</td>
<td>array</td>
<td>optional</td>
</tr>
</tbody>
</table>
<!-- END_b75b40cb3a8d837dfdd7f5b7dfadc54d -->
<!-- START_56009288420f49cd5e7fbd237b151c83 -->
<h2>关闭竞猜</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X DELETE "http://localhost/api/v1/quiz/{quiz}" \
-H "Accept: application/json"</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/quiz/{quiz}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<h3>HTTP Request</h3>
<p><code>DELETE api/v1/quiz/{quiz}</code></p>
<!-- END_56009288420f49cd5e7fbd237b151c83 -->
<!-- START_33779207afc20746f0d8cb615d2e65ed -->
<h2>修改竞猜</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X POST "http://localhost/api/v1/quiz/{quiz}" \
-H "Accept: application/json" \
    -d "name"="nobis" \
    -d "type"="2" \
    -d "options.home_team"="nobis" \
    -d "options.visiting_team"="nobis" \
    -d "options.start_at"="2018-06-19 10:34:38" \
    -d "group_id"="4929715" \
    -d "copper_limit"="68531870" \
    -d "is_public"="1" \
    -d "stop_at"="2018-06-19 10:34:38" \
    -d "items"="nobis" \
</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/quiz/{quiz}",
    "method": "POST",
    "data": {
        "name": "nobis",
        "type": "2",
        "options.home_team": "nobis",
        "options.visiting_team": "nobis",
        "options.start_at": "2018-06-19 10:34:38",
        "group_id": 4929715,
        "copper_limit": 68531870,
        "is_public": true,
        "stop_at": "2018-06-19 10:34:38",
        "items": "nobis"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<h3>HTTP Request</h3>
<p><code>POST api/v1/quiz/{quiz}</code></p>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Status</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>string</td>
<td>required</td>
<td>Maximum: <code>100</code></td>
</tr>
<tr>
<td>type</td>
<td>string</td>
<td>required</td>
<td><code>1</code> or <code>2</code></td>
</tr>
<tr>
<td>options.home_team</td>
<td>string</td>
<td>optional</td>
<td>Maximum: <code>50</code></td>
</tr>
<tr>
<td>options.visiting_team</td>
<td>string</td>
<td>optional</td>
<td>Maximum: <code>50</code></td>
</tr>
<tr>
<td>options.start_at</td>
<td>date</td>
<td>optional</td>
<td>Date format: <code>Y-m-d H:i:s</code></td>
</tr>
<tr>
<td>group_id</td>
<td>integer</td>
<td>required</td>
</tr>
<tr>
<td>copper_limit</td>
<td>integer</td>
<td>required</td>
<td>Maximum: <code>100000000</code></td>
</tr>
<tr>
<td>is_public</td>
<td>boolean</td>
<td>required</td>
</tr>
<tr>
<td>stop_at</td>
<td>date</td>
<td>required</td>
<td>Date format: <code>Y-m-d H:i:s</code></td>
</tr>
<tr>
<td>items</td>
<td>array</td>
<td>optional</td>
</tr>
</tbody>
</table>
<!-- END_33779207afc20746f0d8cb615d2e65ed -->
<h1>竞猜内容</h1>
<p>Class QuizItemController</p>
<!-- START_6b8c9f1e026c5635db86f35f92a54e32 -->
<h2>添加竞猜内容</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X POST "http://localhost/api/v1/quiz/{quiz}/item" \
-H "Accept: application/json" \
    -d "name"="eaque" \
    -d "odds"="8" \
</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/quiz/{quiz}/item",
    "method": "POST",
    "data": {
        "name": "eaque",
        "odds": 8
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<h3>HTTP Request</h3>
<p><code>POST api/v1/quiz/{quiz}/item</code></p>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Status</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>string</td>
<td>required</td>
<td>Maximum: <code>50</code></td>
</tr>
<tr>
<td>odds</td>
<td>numeric</td>
<td>required</td>
</tr>
</tbody>
</table>
<!-- END_6b8c9f1e026c5635db86f35f92a54e32 -->
<!-- START_85b9a17d5a9f49b1804908cbf630d460 -->
<h2>修改竞猜内容</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X POST "http://localhost/api/v1/quiz/item/{quizItem}" \
-H "Accept: application/json" \
    -d "name"="laborum" \
    -d "odds"="459809" \
</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/quiz/item/{quizItem}",
    "method": "POST",
    "data": {
        "name": "laborum",
        "odds": 459809
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<h3>HTTP Request</h3>
<p><code>POST api/v1/quiz/item/{quizItem}</code></p>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Status</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>string</td>
<td>required</td>
<td>Maximum: <code>50</code></td>
</tr>
<tr>
<td>odds</td>
<td>numeric</td>
<td>required</td>
</tr>
</tbody>
</table>
<!-- END_85b9a17d5a9f49b1804908cbf630d460 -->
<!-- START_a74237ff04cdcccad8818cd124a8787d -->
<h2>关闭竞猜内容</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X DELETE "http://localhost/api/v1/quiz/item/{quizItem}" \
-H "Accept: application/json"</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/quiz/item/{quizItem}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<h3>HTTP Request</h3>
<p><code>DELETE api/v1/quiz/item/{quizItem}</code></p>
<!-- END_a74237ff04cdcccad8818cd124a8787d -->
<h1>竞猜操作</h1>
<p>Class PlayController</p>
<!-- START_9f03e6a96515fcd4b2b94f40cfa4790a -->
<h2>下注</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X POST "http://localhost/api/v1/quiz/{quizItem}/bet" \
-H "Accept: application/json" \
    -d "copper"="55444863" \
</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/quiz/{quizItem}/bet",
    "method": "POST",
    "data": {
        "copper": 55444863
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<h3>HTTP Request</h3>
<p><code>POST api/v1/quiz/{quizItem}/bet</code></p>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Status</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>copper</td>
<td>integer</td>
<td>required</td>
<td>Maximum: <code>100000000</code></td>
</tr>
</tbody>
</table>
<!-- END_9f03e6a96515fcd4b2b94f40cfa4790a -->
<!-- START_aa4c34afa5447b3628ca7a2754b06e47 -->
<h2>公布结果</h2>
<blockquote>
<p>Example request:</p>
</blockquote>
<pre><code class="language-bash">curl -X POST "http://localhost/api/v1/quiz/{quiz}/announce" \
-H "Accept: application/json" \
    -d "result"="libero" \
    -d "items"="libero" \
</code></pre>
<pre><code class="language-javascript">var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/quiz/{quiz}/announce",
    "method": "POST",
    "data": {
        "result": "libero",
        "items": "libero"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});</code></pre>
<h3>HTTP Request</h3>
<p><code>POST api/v1/quiz/{quiz}/announce</code></p>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Status</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>result</td>
<td>string</td>
<td>required</td>
<td>Maximum: <code>128</code></td>
</tr>
<tr>
<td>items</td>
<td>array</td>
<td>optional</td>
</tr>
</tbody>
</table>
<!-- END_aa4c34afa5447b3628ca7a2754b06e47 -->
      </div>
      <div class="dark-box">
                        <div class="lang-selector">
                                    <a href="#" data-language-name="bash">bash</a>
                                    <a href="#" data-language-name="javascript">javascript</a>
                              </div>
                </div>
    </div>
  </body>
</html>